package com.han.bloghan.controller.api;

import com.han.bloghan.common.CommonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@Controller
@RequestMapping(value = "/v1/actions")
@Api(tags = "操作动作相关api")
public class ActionController {

    @GetMapping(value = "/{list_id}/stars")
    @ApiOperation(value = "获取stars")
    public CommonResult getStars(@PathVariable(value = "list_id") Integer itemId){
        return CommonResult.success("ok");
    }

    @PostMapping(value = "/{list_id}/stars")
    @ApiOperation(value = "加stars")
    public CommonResult setStars(@PathVariable(value = "list_id") Integer itemId){
        return CommonResult.success("ok");
    }

    @PatchMapping(value = "/{list_id}/stars")
    @ApiOperation(value = "取消stars")
    public CommonResult patchStars(){
        return CommonResult.success("ok");
    }

    @GetMapping(value = "/collects/{user_id}")
    @ApiOperation(value = "收藏列表")
    public CommonResult collectItem(@PathVariable(value = "user_id") Integer userId){
        return CommonResult.success("ok");
    }

    @PostMapping(value = "/collects")
    @ApiOperation(value = "点击收藏")
    public CommonResult setCollect(){
        return CommonResult.success("ok");
    }

    @DeleteMapping(value = "/collects/{list_id}")
    @ApiOperation(value = "取消收藏")
    public CommonResult cancelCollect(@PathVariable(value = "list_id") Integer listId){
        return CommonResult.success("ok");
    }
}
